package com.dubbo.provider.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dubbo.provider.service.ProviderService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 服务实现
 * @author zhu_jinsheng
 * @version 1.0
 * @date 2020/7/2 15:20
 */
@Service(interfaceClass = ProviderService.class)
@Component
public class ProviderServiceImpl implements ProviderService {

    @Value("${dubbo.application.name}")
    private String serverName;
    /**
     * 打招呼服务
     *
     * @param name 名称
     * @return 返回值
     */
    @Override
    public String sayHello(String name) {
        return serverName + "提供服务：" + name;
    }
}
